package com.atguigu.gmall.product.mapper;

import com.atguigu.gmall.model.product.BaseAttrInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
 * ClassName: BaseAttrInfoMapper
 * Package: com.atguigu.gmall.product.mapper
 * Description:
 *
 * @Author 刘轩
 * @Create 2023-08-16 19:32
 * @Version 1.0
 */

@Mapper
public interface BaseAttrInfoMapper extends BaseMapper<BaseAttrInfo> {
    /**
     * 完成平台属性 属性值 一对多查询
     * 查询所有平台属性
     *
     * @param category1Id
     * @param category2Id
     * @param category3Id
     * @return
     */
    List<BaseAttrInfo> selectAttrInfoList(@Param("category1Id") Long category1Id, @Param("category2Id") Long category2Id, @Param("category3Id") Long category3Id);

    /**
     * 根据SkuID查询当前商品包含平台属性以及属性值
     * @param skuId
     * @return
     */
    List<BaseAttrInfo> getAttrList(Long skuId);
}

